Skip to content

Conversation

valentinpalkovic
Copy link
Contributor

@valentinpalkovic valentinpalkovic commented Jan 22, 2025

Closes storybookjs/storybook#30303

PNPM or yarn pnp are strict about accessing dependencies. A module is only allowed to access dependencies if they are defined in its package.json. The user usually doesn't install styled-jsx directly. The transformed button element has references to styled-jsx/style, which cannot be resolved. Therefore, we have to alias styled-jsx and access the styled-jsx module provided by this plugin's package.json's dependencies.

📦 Published PR as canary version: 1.1.2--canary.31.ce898c2.0

✨ Test out this PR locally via:

npm install [email protected]
# or 
yarn add [email protected]

@valentinpalkovic valentinpalkovic force-pushed the valentin/fix-styled-jsx-hoisting-issue branch from e8cae1a to e26bac4 Compare January 22, 2025 14:39
@valentinpalkovic valentinpalkovic force-pushed the valentin/fix-styled-jsx-hoisting-issue branch from e26bac4 to ce898c2 Compare January 22, 2025 14:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug]: Next.js-Vite fails in new Next.js project
1 participant